package fri.pipt.agent.deathrow;

public class Pos2
{
	public int x;
	public int y;
	
	public Pos2() {}
	
	public Pos2(Pos2 pos)
	{
		this(pos.x, pos.y);
	}
	
	public Pos2(int x, int y) 
	{
		this.x = x;
		this.y = y;
	}
	
	public void set(int x, int y)
	{
		this.x = x;
		this.y = y;
	}
	
	public void set(Pos2 pos)
	{
		this.x = pos.x;
		this.y = pos.y;
		
	}
	
	@Override
	public boolean equals(Object o)
	{
		if(o instanceof Pos2)
		{
			Pos2 pos = (Pos2)o;
			if(pos.x == x && pos.y == y)
				return true;
			else
				return false;
		}
		else 
			return false;
	}
	
	@Override
	public String toString()
	{
		return "vec2("+x+","+y+")";
	}
}
